import java.util.Scanner;

public class Test {
    public static void getAge(int age) throws AgeException{
        if (age < 18 || age > 80) {
            throw new MyAgeException("年龄应该在18到20之间");
        }
    }


    public static boolean getAge2(int age) {
        if (age < 18 || age > 80) {
            return false;
        }
        return true;
    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int age = scanner.nextInt();
        if (age < 18 || age > 80) {
            throw new MyAgeException("年龄应该在18到20之间");
        }

        int sum = 2;
        while(sum -- != 0){
            int a = scanner.nextInt();
            try {
                if (getAge2(age)) {
                    System.out.println("年龄范围正确");
                } else {
                    System.out.println("年龄范围错误");
                }
            } catch (MyAgeException errorExecption) {
                errorExecption.printStackTrace();
                System.out.println("年龄异常");
            }
        }
    }
}
